package cn.kgc.tcst004.maoqichao.crowdfundingadminspringboot.controller;

import cn.kgc.tcst004.maoqichao.crowdfundingadminspringboot.common.ResultEntity;
import cn.kgc.tcst004.maoqichao.crowdfundingadminspringboot.pojo.Auth;
import cn.kgc.tcst004.maoqichao.crowdfundingadminspringboot.service.AuthService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class AuthController {
    @Resource
    AuthService authService;
    @ResponseBody
    @RequestMapping("/assign/get/all/auth")
    public ResultEntity<List<Auth>> getAllAuth() {

        List<Auth> authList = authService.getAllAuth();

        return ResultEntity.successWithoutData(authList);
    }
}
